package org.etlt.check;

import org.etlt.SettingCheck;

import java.util.Objects;

public class CheckPointSetting implements SettingCheck {
    private String name;

    private String description;

    private CheckPointType type;

    private String expected;

    private String actual;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public CheckPointType getType() {
        return type;
    }

    public void setType(CheckPointType type) {
        this.type = type;
    }

    public String getExpected() {
        return expected;
    }

    public void setExpected(String expected) {
        this.expected = expected;
    }

    public String getActual() {
        return actual;
    }

    public void setActual(String actual) {
        this.actual = actual;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CheckPointSetting that = (CheckPointSetting) o;
        return name.equals(that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public void check() {
        this.assertNotNull("name", this.name);
    }
}
